import Vue from "vue";
import Vuex from "vuex"
Vue.use(Vuex)
export default new Vuex.Store({
    state: {
        detail_goods_img: [],
        detail_swipe_img: [],
        order_all: [],
        order_delected_index:'',
        goods_info: [],
        pay_all: [],
        buyed_order_all: [],
        address_info: [],
        select_address: []
    },
    mutations: {
        muChangeDetail_DoodsImg(state, data) {
            state.detail_goods_img = data
        },
        muDeailSwipeImg(state, data) {
            state.detail_swipe_img = data
        },
        muChangeOrder_all(state, data) {
            state.order_all.push(data)
        },
        muOrder_deleted(state, data) {
            state.order_all.splice(data, 1)
        },
        muGoods_info(state, data) {
            state.goods_info = data
        },
        muChangePay_all(state, data) {
            state.pay_all = data
        },
        muChangebuyed_order(state, data) {
            state.buyed_order_all.push(data)
        },
        muaddress_info(state, data) {
            state.address_info.push(data)
        },
        muSelectAddress(state, data) {
            state.select_address = data
        },
        muOrder_deleted_index(state,data){
            state.order_delected_index=data
        }


    },
    actions: {

    }
})